﻿/*
Copyright © 2011 Nokia Corporation. All rights reserved.
Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation. 
Java and all Java-based marks are trademarks or registered trademarks of 
Sun Microsystems, Inc. Other product and company names mentioned herein may be 
trademarks or trade names of their respective owners.

Subject to the conditions below, you may, without charge:

·  Use, copy, modify and/or merge copies of this software and 
   associated content and documentation files (the “Software”)

·  Publish, distribute, sub-licence and/or sell new software 
   derived from or incorporating the Software.

Some of the documentation, content and/or software maybe licensed under open source software or other licenses.  To the extent such documentation, content and/or software are included, licenses and/or other terms and conditions shall apply in addition and/or instead of this notice. The exact terms of the licenses, disclaimers, acknowledgements and notices are reproduced in the materials provided.

This file, unmodified, shall be included with all copies or substantial portions
of the Software that are distributed in source code form.

The Software cannot constitute the primary value of any new software derived 
from or incorporating the Software.

Any person dealing with the Software shall not misrepresent the source of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

// 
// This code was auto-generated by Microsoft.Silverlight.Phone.ServiceReference, version 3.7.0.0
// 
namespace Carpool.Bing.Geocode {
    using System.Runtime.Serialization;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="RequestBase", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.ReverseGeocodeRequest))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.GeocodeRequest))]
    public partial class RequestBase : object, System.ComponentModel.INotifyPropertyChanged {
        
        private Microsoft.Phone.Controls.Maps.Credentials CredentialsField;
        
        private string CultureField;
        
        private Carpool.Bing.Geocode.ExecutionOptions ExecutionOptionsField;
        
        private Carpool.Bing.Geocode.UserProfile UserProfileField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Microsoft.Phone.Controls.Maps.Credentials Credentials {
            get {
                return this.CredentialsField;
            }
            set {
                if ((object.ReferenceEquals(this.CredentialsField, value) != true)) {
                    this.CredentialsField = value;
                    this.RaisePropertyChanged("Credentials");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Culture {
            get {
                return this.CultureField;
            }
            set {
                if ((object.ReferenceEquals(this.CultureField, value) != true)) {
                    this.CultureField = value;
                    this.RaisePropertyChanged("Culture");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.ExecutionOptions ExecutionOptions {
            get {
                return this.ExecutionOptionsField;
            }
            set {
                if ((object.ReferenceEquals(this.ExecutionOptionsField, value) != true)) {
                    this.ExecutionOptionsField = value;
                    this.RaisePropertyChanged("ExecutionOptions");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.UserProfile UserProfile {
            get {
                return this.UserProfileField;
            }
            set {
                if ((object.ReferenceEquals(this.UserProfileField, value) != true)) {
                    this.UserProfileField = value;
                    this.RaisePropertyChanged("UserProfile");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="ExecutionOptions", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public partial class ExecutionOptions : object, System.ComponentModel.INotifyPropertyChanged {
        
        private bool SuppressFaultsField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool SuppressFaults {
            get {
                return this.SuppressFaultsField;
            }
            set {
                if ((this.SuppressFaultsField.Equals(value) != true)) {
                    this.SuppressFaultsField = value;
                    this.RaisePropertyChanged("SuppressFaults");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="UserProfile", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Microsoft.Phone.Controls.Maps.Platform.Rectangle))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.Circle))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.Polygon))]
    public partial class UserProfile : object, System.ComponentModel.INotifyPropertyChanged {
        
        private Carpool.Bing.Geocode.Heading CurrentHeadingField;
        
        private Carpool.Bing.Geocode.UserLocation CurrentLocationField;
        
        private Carpool.Bing.Geocode.DeviceType DeviceTypeField;
        
        private Carpool.Bing.Geocode.DistanceUnit DistanceUnitField;
        
        private string IPAddressField;
        
        private Microsoft.Phone.Controls.Maps.Platform.ShapeBase MapViewField;
        
        private Carpool.Bing.Geocode.SizeOfint ScreenSizeField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.Heading CurrentHeading {
            get {
                return this.CurrentHeadingField;
            }
            set {
                if ((object.ReferenceEquals(this.CurrentHeadingField, value) != true)) {
                    this.CurrentHeadingField = value;
                    this.RaisePropertyChanged("CurrentHeading");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.UserLocation CurrentLocation {
            get {
                return this.CurrentLocationField;
            }
            set {
                if ((object.ReferenceEquals(this.CurrentLocationField, value) != true)) {
                    this.CurrentLocationField = value;
                    this.RaisePropertyChanged("CurrentLocation");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.DeviceType DeviceType {
            get {
                return this.DeviceTypeField;
            }
            set {
                if ((this.DeviceTypeField.Equals(value) != true)) {
                    this.DeviceTypeField = value;
                    this.RaisePropertyChanged("DeviceType");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.DistanceUnit DistanceUnit {
            get {
                return this.DistanceUnitField;
            }
            set {
                if ((this.DistanceUnitField.Equals(value) != true)) {
                    this.DistanceUnitField = value;
                    this.RaisePropertyChanged("DistanceUnit");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string IPAddress {
            get {
                return this.IPAddressField;
            }
            set {
                if ((object.ReferenceEquals(this.IPAddressField, value) != true)) {
                    this.IPAddressField = value;
                    this.RaisePropertyChanged("IPAddress");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Microsoft.Phone.Controls.Maps.Platform.ShapeBase MapView {
            get {
                return this.MapViewField;
            }
            set {
                if ((object.ReferenceEquals(this.MapViewField, value) != true)) {
                    this.MapViewField = value;
                    this.RaisePropertyChanged("MapView");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.SizeOfint ScreenSize {
            get {
                return this.ScreenSizeField;
            }
            set {
                if ((object.ReferenceEquals(this.ScreenSizeField, value) != true)) {
                    this.ScreenSizeField = value;
                    this.RaisePropertyChanged("ScreenSize");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="ReverseGeocodeRequest", Namespace="http://dev.virtualearth.net/webservices/v1/geocode")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.GeocodeLocation))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.UserLocation))]
    public partial class ReverseGeocodeRequest : Carpool.Bing.Geocode.RequestBase {
        
        private Microsoft.Phone.Controls.Maps.Platform.Location LocationField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Microsoft.Phone.Controls.Maps.Platform.Location Location {
            get {
                return this.LocationField;
            }
            set {
                if ((object.ReferenceEquals(this.LocationField, value) != true)) {
                    this.LocationField = value;
                    this.RaisePropertyChanged("Location");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="GeocodeRequest", Namespace="http://dev.virtualearth.net/webservices/v1/geocode")]
    public partial class GeocodeRequest : Carpool.Bing.Geocode.RequestBase {
        
        private Carpool.Bing.Geocode.Address AddressField;
        
        private Carpool.Bing.Geocode.GeocodeOptions OptionsField;
        
        private string QueryField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.Address Address {
            get {
                return this.AddressField;
            }
            set {
                if ((object.ReferenceEquals(this.AddressField, value) != true)) {
                    this.AddressField = value;
                    this.RaisePropertyChanged("Address");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.GeocodeOptions Options {
            get {
                return this.OptionsField;
            }
            set {
                if ((object.ReferenceEquals(this.OptionsField, value) != true)) {
                    this.OptionsField = value;
                    this.RaisePropertyChanged("Options");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Query {
            get {
                return this.QueryField;
            }
            set {
                if ((object.ReferenceEquals(this.QueryField, value) != true)) {
                    this.QueryField = value;
                    this.RaisePropertyChanged("Query");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Address", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public partial class Address : object, System.ComponentModel.INotifyPropertyChanged {
        
        private string AddressLineField;
        
        private string AdminDistrictField;
        
        private string CountryRegionField;
        
        private string DistrictField;
        
        private string FormattedAddressField;
        
        private string LocalityField;
        
        private string PostalCodeField;
        
        private string PostalTownField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string AddressLine {
            get {
                return this.AddressLineField;
            }
            set {
                if ((object.ReferenceEquals(this.AddressLineField, value) != true)) {
                    this.AddressLineField = value;
                    this.RaisePropertyChanged("AddressLine");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string AdminDistrict {
            get {
                return this.AdminDistrictField;
            }
            set {
                if ((object.ReferenceEquals(this.AdminDistrictField, value) != true)) {
                    this.AdminDistrictField = value;
                    this.RaisePropertyChanged("AdminDistrict");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string CountryRegion {
            get {
                return this.CountryRegionField;
            }
            set {
                if ((object.ReferenceEquals(this.CountryRegionField, value) != true)) {
                    this.CountryRegionField = value;
                    this.RaisePropertyChanged("CountryRegion");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string District {
            get {
                return this.DistrictField;
            }
            set {
                if ((object.ReferenceEquals(this.DistrictField, value) != true)) {
                    this.DistrictField = value;
                    this.RaisePropertyChanged("District");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string FormattedAddress {
            get {
                return this.FormattedAddressField;
            }
            set {
                if ((object.ReferenceEquals(this.FormattedAddressField, value) != true)) {
                    this.FormattedAddressField = value;
                    this.RaisePropertyChanged("FormattedAddress");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Locality {
            get {
                return this.LocalityField;
            }
            set {
                if ((object.ReferenceEquals(this.LocalityField, value) != true)) {
                    this.LocalityField = value;
                    this.RaisePropertyChanged("Locality");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string PostalCode {
            get {
                return this.PostalCodeField;
            }
            set {
                if ((object.ReferenceEquals(this.PostalCodeField, value) != true)) {
                    this.PostalCodeField = value;
                    this.RaisePropertyChanged("PostalCode");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string PostalTown {
            get {
                return this.PostalTownField;
            }
            set {
                if ((object.ReferenceEquals(this.PostalTownField, value) != true)) {
                    this.PostalTownField = value;
                    this.RaisePropertyChanged("PostalTown");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="GeocodeOptions", Namespace="http://dev.virtualearth.net/webservices/v1/geocode")]
    public partial class GeocodeOptions : object, System.ComponentModel.INotifyPropertyChanged {
        
        private System.Nullable<int> CountField;
        
        private System.Collections.ObjectModel.ObservableCollection<Carpool.Bing.Geocode.FilterBase> FiltersField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<int> Count {
            get {
                return this.CountField;
            }
            set {
                if ((this.CountField.Equals(value) != true)) {
                    this.CountField = value;
                    this.RaisePropertyChanged("Count");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Collections.ObjectModel.ObservableCollection<Carpool.Bing.Geocode.FilterBase> Filters {
            get {
                return this.FiltersField;
            }
            set {
                if ((object.ReferenceEquals(this.FiltersField, value) != true)) {
                    this.FiltersField = value;
                    this.RaisePropertyChanged("Filters");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Heading", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public partial class Heading : object, System.ComponentModel.INotifyPropertyChanged {
        
        private double OrientationField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public double Orientation {
            get {
                return this.OrientationField;
            }
            set {
                if ((this.OrientationField.Equals(value) != true)) {
                    this.OrientationField = value;
                    this.RaisePropertyChanged("Orientation");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="UserLocation", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public partial class UserLocation : Microsoft.Phone.Controls.Maps.Platform.Location, System.ComponentModel.INotifyPropertyChanged {
        
        private Carpool.Bing.Geocode.Confidence ConfidenceField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.Confidence Confidence {
            get {
                return this.ConfidenceField;
            }
            set {
                if ((this.ConfidenceField.Equals(value) != true)) {
                    this.ConfidenceField = value;
                    this.RaisePropertyChanged("Confidence");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="SizeOfint", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public partial class SizeOfint : object, System.ComponentModel.INotifyPropertyChanged {
        
        private int HeightField;
        
        private int WidthField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public int Height {
            get {
                return this.HeightField;
            }
            set {
                if ((this.HeightField.Equals(value) != true)) {
                    this.HeightField = value;
                    this.RaisePropertyChanged("Height");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public int Width {
            get {
                return this.WidthField;
            }
            set {
                if ((this.WidthField.Equals(value) != true)) {
                    this.WidthField = value;
                    this.RaisePropertyChanged("Width");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Circle", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.GeocodeLocation))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.UserLocation))]
    public partial class Circle : Microsoft.Phone.Controls.Maps.Platform.ShapeBase, System.ComponentModel.INotifyPropertyChanged {
        
        private Microsoft.Phone.Controls.Maps.Platform.Location CenterField;
        
        private Carpool.Bing.Geocode.DistanceUnit DistanceUnitField;
        
        private double RadiusField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Microsoft.Phone.Controls.Maps.Platform.Location Center {
            get {
                return this.CenterField;
            }
            set {
                if ((object.ReferenceEquals(this.CenterField, value) != true)) {
                    this.CenterField = value;
                    this.RaisePropertyChanged("Center");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.DistanceUnit DistanceUnit {
            get {
                return this.DistanceUnitField;
            }
            set {
                if ((this.DistanceUnitField.Equals(value) != true)) {
                    this.DistanceUnitField = value;
                    this.RaisePropertyChanged("DistanceUnit");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public double Radius {
            get {
                return this.RadiusField;
            }
            set {
                if ((this.RadiusField.Equals(value) != true)) {
                    this.RadiusField = value;
                    this.RaisePropertyChanged("Radius");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Polygon", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public partial class Polygon : Microsoft.Phone.Controls.Maps.Platform.ShapeBase, System.ComponentModel.INotifyPropertyChanged {
        
        private System.Collections.ObjectModel.ObservableCollection<Microsoft.Phone.Controls.Maps.Platform.Location> VerticesField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Collections.ObjectModel.ObservableCollection<Microsoft.Phone.Controls.Maps.Platform.Location> Vertices {
            get {
                return this.VerticesField;
            }
            set {
                if ((object.ReferenceEquals(this.VerticesField, value) != true)) {
                    this.VerticesField = value;
                    this.RaisePropertyChanged("Vertices");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="DeviceType", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public enum DeviceType : int {
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        Desktop = 0,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        Mobile = 1,
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="DistanceUnit", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public enum DistanceUnit : int {
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        Kilometer = 0,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        Mile = 1,
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Confidence", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public enum Confidence : int {
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        High = 0,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        Medium = 1,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        Low = 2,
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="GeocodeLocation", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public partial class GeocodeLocation : Microsoft.Phone.Controls.Maps.Platform.Location, System.ComponentModel.INotifyPropertyChanged {
        
        private string CalculationMethodField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string CalculationMethod {
            get {
                return this.CalculationMethodField;
            }
            set {
                if ((object.ReferenceEquals(this.CalculationMethodField, value) != true)) {
                    this.CalculationMethodField = value;
                    this.RaisePropertyChanged("CalculationMethod");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="FilterBase", Namespace="http://dev.virtualearth.net/webservices/v1/geocode")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.ConfidenceFilter))]
    public partial class FilterBase : object, System.ComponentModel.INotifyPropertyChanged {
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="ConfidenceFilter", Namespace="http://dev.virtualearth.net/webservices/v1/geocode")]
    public partial class ConfidenceFilter : Carpool.Bing.Geocode.FilterBase {
        
        private Carpool.Bing.Geocode.Confidence MinimumConfidenceField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.Confidence MinimumConfidence {
            get {
                return this.MinimumConfidenceField;
            }
            set {
                if ((this.MinimumConfidenceField.Equals(value) != true)) {
                    this.MinimumConfidenceField = value;
                    this.RaisePropertyChanged("MinimumConfidence");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="ResponseBase", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.GeocodeResponse))]
    public partial class ResponseBase : object, System.ComponentModel.INotifyPropertyChanged {
        
        private System.Uri BrandLogoUriField;
        
        private Carpool.Bing.Geocode.ResponseSummary ResponseSummaryField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Uri BrandLogoUri {
            get {
                return this.BrandLogoUriField;
            }
            set {
                if ((object.ReferenceEquals(this.BrandLogoUriField, value) != true)) {
                    this.BrandLogoUriField = value;
                    this.RaisePropertyChanged("BrandLogoUri");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.ResponseSummary ResponseSummary {
            get {
                return this.ResponseSummaryField;
            }
            set {
                if ((object.ReferenceEquals(this.ResponseSummaryField, value) != true)) {
                    this.ResponseSummaryField = value;
                    this.RaisePropertyChanged("ResponseSummary");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="ResponseSummary", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public partial class ResponseSummary : object, System.ComponentModel.INotifyPropertyChanged {
        
        private Carpool.Bing.Geocode.AuthenticationResultCode AuthenticationResultCodeField;
        
        private string CopyrightField;
        
        private string FaultReasonField;
        
        private Carpool.Bing.Geocode.ResponseStatusCode StatusCodeField;
        
        private string TraceIdField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.AuthenticationResultCode AuthenticationResultCode {
            get {
                return this.AuthenticationResultCodeField;
            }
            set {
                if ((this.AuthenticationResultCodeField.Equals(value) != true)) {
                    this.AuthenticationResultCodeField = value;
                    this.RaisePropertyChanged("AuthenticationResultCode");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Copyright {
            get {
                return this.CopyrightField;
            }
            set {
                if ((object.ReferenceEquals(this.CopyrightField, value) != true)) {
                    this.CopyrightField = value;
                    this.RaisePropertyChanged("Copyright");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string FaultReason {
            get {
                return this.FaultReasonField;
            }
            set {
                if ((object.ReferenceEquals(this.FaultReasonField, value) != true)) {
                    this.FaultReasonField = value;
                    this.RaisePropertyChanged("FaultReason");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.ResponseStatusCode StatusCode {
            get {
                return this.StatusCodeField;
            }
            set {
                if ((this.StatusCodeField.Equals(value) != true)) {
                    this.StatusCodeField = value;
                    this.RaisePropertyChanged("StatusCode");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string TraceId {
            get {
                return this.TraceIdField;
            }
            set {
                if ((object.ReferenceEquals(this.TraceIdField, value) != true)) {
                    this.TraceIdField = value;
                    this.RaisePropertyChanged("TraceId");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="GeocodeResponse", Namespace="http://dev.virtualearth.net/webservices/v1/geocode")]
    public partial class GeocodeResponse : Carpool.Bing.Geocode.ResponseBase {
        
        private System.Collections.ObjectModel.ObservableCollection<Carpool.Bing.Geocode.GeocodeResult> ResultsField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Collections.ObjectModel.ObservableCollection<Carpool.Bing.Geocode.GeocodeResult> Results {
            get {
                return this.ResultsField;
            }
            set {
                if ((object.ReferenceEquals(this.ResultsField, value) != true)) {
                    this.ResultsField = value;
                    this.RaisePropertyChanged("Results");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="GeocodeResult", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.GeocodeLocation))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(Carpool.Bing.Geocode.UserLocation))]
    public partial class GeocodeResult : object, System.ComponentModel.INotifyPropertyChanged {
        
        private Carpool.Bing.Geocode.Address AddressField;
        
        private Microsoft.Phone.Controls.Maps.Platform.Rectangle BestViewField;
        
        private Carpool.Bing.Geocode.Confidence ConfidenceField;
        
        private string DisplayNameField;
        
        private string EntityTypeField;
        
        private System.Collections.ObjectModel.ObservableCollection<Carpool.Bing.Geocode.GeocodeLocation> LocationsField;
        
        private System.Collections.ObjectModel.ObservableCollection<string> MatchCodesField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.Address Address {
            get {
                return this.AddressField;
            }
            set {
                if ((object.ReferenceEquals(this.AddressField, value) != true)) {
                    this.AddressField = value;
                    this.RaisePropertyChanged("Address");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Microsoft.Phone.Controls.Maps.Platform.Rectangle BestView {
            get {
                return this.BestViewField;
            }
            set {
                if ((object.ReferenceEquals(this.BestViewField, value) != true)) {
                    this.BestViewField = value;
                    this.RaisePropertyChanged("BestView");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public Carpool.Bing.Geocode.Confidence Confidence {
            get {
                return this.ConfidenceField;
            }
            set {
                if ((this.ConfidenceField.Equals(value) != true)) {
                    this.ConfidenceField = value;
                    this.RaisePropertyChanged("Confidence");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string DisplayName {
            get {
                return this.DisplayNameField;
            }
            set {
                if ((object.ReferenceEquals(this.DisplayNameField, value) != true)) {
                    this.DisplayNameField = value;
                    this.RaisePropertyChanged("DisplayName");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string EntityType {
            get {
                return this.EntityTypeField;
            }
            set {
                if ((object.ReferenceEquals(this.EntityTypeField, value) != true)) {
                    this.EntityTypeField = value;
                    this.RaisePropertyChanged("EntityType");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Collections.ObjectModel.ObservableCollection<Carpool.Bing.Geocode.GeocodeLocation> Locations {
            get {
                return this.LocationsField;
            }
            set {
                if ((object.ReferenceEquals(this.LocationsField, value) != true)) {
                    this.LocationsField = value;
                    this.RaisePropertyChanged("Locations");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Collections.ObjectModel.ObservableCollection<string> MatchCodes {
            get {
                return this.MatchCodesField;
            }
            set {
                if ((object.ReferenceEquals(this.MatchCodesField, value) != true)) {
                    this.MatchCodesField = value;
                    this.RaisePropertyChanged("MatchCodes");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="AuthenticationResultCode", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public enum AuthenticationResultCode : int {
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        None = 0,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        NoCredentials = 1,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        ValidCredentials = 2,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        InvalidCredentials = 3,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        CredentialsExpired = 4,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        NotAuthorized = 7,
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="ResponseStatusCode", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
    public enum ResponseStatusCode : int {
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        Success = 0,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        BadRequest = 1,
        
        [System.Runtime.Serialization.EnumMemberAttribute()]
        ServerError = 2,
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="http://dev.virtualearth.net/webservices/v1/geocode/contracts", ConfigurationName="Bing.Geocode.IGeocodeService")]
    public interface IGeocodeService {
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://dev.virtualearth.net/webservices/v1/geocode/contracts/IGeocodeService/Geoc" +
            "ode", ReplyAction="http://dev.virtualearth.net/webservices/v1/geocode/contracts/IGeocodeService/Geoc" +
            "odeResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(Carpool.Bing.Geocode.ResponseSummary), Action="http://dev.virtualearth.net/webservices/v1/geocode/contracts/IGeocodeService/Geoc" +
            "odeResponseSummaryFault", Name="ResponseSummary", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
        System.IAsyncResult BeginGeocode(Carpool.Bing.Geocode.GeocodeRequest request, System.AsyncCallback callback, object asyncState);
        
        Carpool.Bing.Geocode.GeocodeResponse EndGeocode(System.IAsyncResult result);
        
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://dev.virtualearth.net/webservices/v1/geocode/contracts/IGeocodeService/Reve" +
            "rseGeocode", ReplyAction="http://dev.virtualearth.net/webservices/v1/geocode/contracts/IGeocodeService/Reve" +
            "rseGeocodeResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(Carpool.Bing.Geocode.ResponseSummary), Action="http://dev.virtualearth.net/webservices/v1/geocode/contracts/IGeocodeService/Reve" +
            "rseGeocodeResponseSummaryFault", Name="ResponseSummary", Namespace="http://dev.virtualearth.net/webservices/v1/common")]
        System.IAsyncResult BeginReverseGeocode(Carpool.Bing.Geocode.ReverseGeocodeRequest request, System.AsyncCallback callback, object asyncState);
        
        Carpool.Bing.Geocode.GeocodeResponse EndReverseGeocode(System.IAsyncResult result);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface IGeocodeServiceChannel : Carpool.Bing.Geocode.IGeocodeService, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GeocodeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public GeocodeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public Carpool.Bing.Geocode.GeocodeResponse Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((Carpool.Bing.Geocode.GeocodeResponse)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class ReverseGeocodeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        public ReverseGeocodeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        public Carpool.Bing.Geocode.GeocodeResponse Result {
            get {
                base.RaiseExceptionIfNecessary();
                return ((Carpool.Bing.Geocode.GeocodeResponse)(this.results[0]));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class GeocodeServiceClient : System.ServiceModel.ClientBase<Carpool.Bing.Geocode.IGeocodeService>, Carpool.Bing.Geocode.IGeocodeService {
        
        private BeginOperationDelegate onBeginGeocodeDelegate;
        
        private EndOperationDelegate onEndGeocodeDelegate;
        
        private System.Threading.SendOrPostCallback onGeocodeCompletedDelegate;
        
        private BeginOperationDelegate onBeginReverseGeocodeDelegate;
        
        private EndOperationDelegate onEndReverseGeocodeDelegate;
        
        private System.Threading.SendOrPostCallback onReverseGeocodeCompletedDelegate;
        
        private BeginOperationDelegate onBeginOpenDelegate;
        
        private EndOperationDelegate onEndOpenDelegate;
        
        private System.Threading.SendOrPostCallback onOpenCompletedDelegate;
        
        private BeginOperationDelegate onBeginCloseDelegate;
        
        private EndOperationDelegate onEndCloseDelegate;
        
        private System.Threading.SendOrPostCallback onCloseCompletedDelegate;
        
        public GeocodeServiceClient() {
        }
        
        public GeocodeServiceClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public GeocodeServiceClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public GeocodeServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public GeocodeServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public System.Net.CookieContainer CookieContainer {
            get {
                System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
                if ((httpCookieContainerManager != null)) {
                    return httpCookieContainerManager.CookieContainer;
                }
                else {
                    return null;
                }
            }
            set {
                System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>();
                if ((httpCookieContainerManager != null)) {
                    httpCookieContainerManager.CookieContainer = value;
                }
                else {
                    throw new System.InvalidOperationException("Unable to set the CookieContainer. Please make sure the binding contains an HttpC" +
                            "ookieContainerBindingElement.");
                }
            }
        }
        
        public event System.EventHandler<GeocodeCompletedEventArgs> GeocodeCompleted;
        
        public event System.EventHandler<ReverseGeocodeCompletedEventArgs> ReverseGeocodeCompleted;
        
        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted;
        
        public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted;
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult Carpool.Bing.Geocode.IGeocodeService.BeginGeocode(Carpool.Bing.Geocode.GeocodeRequest request, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginGeocode(request, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        Carpool.Bing.Geocode.GeocodeResponse Carpool.Bing.Geocode.IGeocodeService.EndGeocode(System.IAsyncResult result) {
            return base.Channel.EndGeocode(result);
        }
        
        private System.IAsyncResult OnBeginGeocode(object[] inValues, System.AsyncCallback callback, object asyncState) {
            Carpool.Bing.Geocode.GeocodeRequest request = ((Carpool.Bing.Geocode.GeocodeRequest)(inValues[0]));
            return ((Carpool.Bing.Geocode.IGeocodeService)(this)).BeginGeocode(request, callback, asyncState);
        }
        
        private object[] OnEndGeocode(System.IAsyncResult result) {
            Carpool.Bing.Geocode.GeocodeResponse retVal = ((Carpool.Bing.Geocode.IGeocodeService)(this)).EndGeocode(result);
            return new object[] {
                    retVal};
        }
        
        private void OnGeocodeCompleted(object state) {
            if ((this.GeocodeCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.GeocodeCompleted(this, new GeocodeCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void GeocodeAsync(Carpool.Bing.Geocode.GeocodeRequest request) {
            this.GeocodeAsync(request, null);
        }
        
        public void GeocodeAsync(Carpool.Bing.Geocode.GeocodeRequest request, object userState) {
            if ((this.onBeginGeocodeDelegate == null)) {
                this.onBeginGeocodeDelegate = new BeginOperationDelegate(this.OnBeginGeocode);
            }
            if ((this.onEndGeocodeDelegate == null)) {
                this.onEndGeocodeDelegate = new EndOperationDelegate(this.OnEndGeocode);
            }
            if ((this.onGeocodeCompletedDelegate == null)) {
                this.onGeocodeCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGeocodeCompleted);
            }
            base.InvokeAsync(this.onBeginGeocodeDelegate, new object[] {
                        request}, this.onEndGeocodeDelegate, this.onGeocodeCompletedDelegate, userState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.IAsyncResult Carpool.Bing.Geocode.IGeocodeService.BeginReverseGeocode(Carpool.Bing.Geocode.ReverseGeocodeRequest request, System.AsyncCallback callback, object asyncState) {
            return base.Channel.BeginReverseGeocode(request, callback, asyncState);
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        Carpool.Bing.Geocode.GeocodeResponse Carpool.Bing.Geocode.IGeocodeService.EndReverseGeocode(System.IAsyncResult result) {
            return base.Channel.EndReverseGeocode(result);
        }
        
        private System.IAsyncResult OnBeginReverseGeocode(object[] inValues, System.AsyncCallback callback, object asyncState) {
            Carpool.Bing.Geocode.ReverseGeocodeRequest request = ((Carpool.Bing.Geocode.ReverseGeocodeRequest)(inValues[0]));
            return ((Carpool.Bing.Geocode.IGeocodeService)(this)).BeginReverseGeocode(request, callback, asyncState);
        }
        
        private object[] OnEndReverseGeocode(System.IAsyncResult result) {
            Carpool.Bing.Geocode.GeocodeResponse retVal = ((Carpool.Bing.Geocode.IGeocodeService)(this)).EndReverseGeocode(result);
            return new object[] {
                    retVal};
        }
        
        private void OnReverseGeocodeCompleted(object state) {
            if ((this.ReverseGeocodeCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.ReverseGeocodeCompleted(this, new ReverseGeocodeCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void ReverseGeocodeAsync(Carpool.Bing.Geocode.ReverseGeocodeRequest request) {
            this.ReverseGeocodeAsync(request, null);
        }
        
        public void ReverseGeocodeAsync(Carpool.Bing.Geocode.ReverseGeocodeRequest request, object userState) {
            if ((this.onBeginReverseGeocodeDelegate == null)) {
                this.onBeginReverseGeocodeDelegate = new BeginOperationDelegate(this.OnBeginReverseGeocode);
            }
            if ((this.onEndReverseGeocodeDelegate == null)) {
                this.onEndReverseGeocodeDelegate = new EndOperationDelegate(this.OnEndReverseGeocode);
            }
            if ((this.onReverseGeocodeCompletedDelegate == null)) {
                this.onReverseGeocodeCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnReverseGeocodeCompleted);
            }
            base.InvokeAsync(this.onBeginReverseGeocodeDelegate, new object[] {
                        request}, this.onEndReverseGeocodeDelegate, this.onReverseGeocodeCompletedDelegate, userState);
        }
        
        private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState);
        }
        
        private object[] OnEndOpen(System.IAsyncResult result) {
            ((System.ServiceModel.ICommunicationObject)(this)).EndOpen(result);
            return null;
        }
        
        private void OnOpenCompleted(object state) {
            if ((this.OpenCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.OpenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void OpenAsync() {
            this.OpenAsync(null);
        }
        
        public void OpenAsync(object userState) {
            if ((this.onBeginOpenDelegate == null)) {
                this.onBeginOpenDelegate = new BeginOperationDelegate(this.OnBeginOpen);
            }
            if ((this.onEndOpenDelegate == null)) {
                this.onEndOpenDelegate = new EndOperationDelegate(this.OnEndOpen);
            }
            if ((this.onOpenCompletedDelegate == null)) {
                this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnOpenCompleted);
            }
            base.InvokeAsync(this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState);
        }
        
        private System.IAsyncResult OnBeginClose(object[] inValues, System.AsyncCallback callback, object asyncState) {
            return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose(callback, asyncState);
        }
        
        private object[] OnEndClose(System.IAsyncResult result) {
            ((System.ServiceModel.ICommunicationObject)(this)).EndClose(result);
            return null;
        }
        
        private void OnCloseCompleted(object state) {
            if ((this.CloseCompleted != null)) {
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
                this.CloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState));
            }
        }
        
        public void CloseAsync() {
            this.CloseAsync(null);
        }
        
        public void CloseAsync(object userState) {
            if ((this.onBeginCloseDelegate == null)) {
                this.onBeginCloseDelegate = new BeginOperationDelegate(this.OnBeginClose);
            }
            if ((this.onEndCloseDelegate == null)) {
                this.onEndCloseDelegate = new EndOperationDelegate(this.OnEndClose);
            }
            if ((this.onCloseCompletedDelegate == null)) {
                this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCloseCompleted);
            }
            base.InvokeAsync(this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState);
        }
        
        protected override Carpool.Bing.Geocode.IGeocodeService CreateChannel() {
            return new GeocodeServiceClientChannel(this);
        }
        
        private class GeocodeServiceClientChannel : ChannelBase<Carpool.Bing.Geocode.IGeocodeService>, Carpool.Bing.Geocode.IGeocodeService {
            
            public GeocodeServiceClientChannel(System.ServiceModel.ClientBase<Carpool.Bing.Geocode.IGeocodeService> client) : 
                    base(client) {
            }
            
            public System.IAsyncResult BeginGeocode(Carpool.Bing.Geocode.GeocodeRequest request, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = request;
                System.IAsyncResult _result = base.BeginInvoke("Geocode", _args, callback, asyncState);
                return _result;
            }
            
            public Carpool.Bing.Geocode.GeocodeResponse EndGeocode(System.IAsyncResult result) {
                object[] _args = new object[0];
                Carpool.Bing.Geocode.GeocodeResponse _result = ((Carpool.Bing.Geocode.GeocodeResponse)(base.EndInvoke("Geocode", _args, result)));
                return _result;
            }
            
            public System.IAsyncResult BeginReverseGeocode(Carpool.Bing.Geocode.ReverseGeocodeRequest request, System.AsyncCallback callback, object asyncState) {
                object[] _args = new object[1];
                _args[0] = request;
                System.IAsyncResult _result = base.BeginInvoke("ReverseGeocode", _args, callback, asyncState);
                return _result;
            }
            
            public Carpool.Bing.Geocode.GeocodeResponse EndReverseGeocode(System.IAsyncResult result) {
                object[] _args = new object[0];
                Carpool.Bing.Geocode.GeocodeResponse _result = ((Carpool.Bing.Geocode.GeocodeResponse)(base.EndInvoke("ReverseGeocode", _args, result)));
                return _result;
            }
        }
    }
}
